﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace XDAFacebook
{
    public partial class About : Form
    {
        public About()
        {
            InitializeComponent();
            this.AboutText.Text = "XDA Facebook release " + Settings.CurrentVersion + "\r\nWin-Mobile version\r\n\r\nAuthors: (See Forum)" +
    "\r\n\r\nRequirements: .Net Compact Framework 3.5\r\n\r\nCredits: ...";
        }

        private void linkGoogleCode_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://code.google.com/p/xda-winmo-facebook/", null);
        }

        private void linkXDAForum_Click(object sender, EventArgs e)
        {
            System.Diagnostics.Process.Start("http://forum.xda-developers.com/showthread.php?t=871097", null);
        }

        private void DonateLink_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Press OK to launch PayPal website\nOR\nPress Cancel to copy the PayPal URL (paste in an e-mail, send to self, and launch from desktop)", "Thank you for donating!", MessageBoxButtons.OKCancel, MessageBoxIcon.None, MessageBoxDefaultButton.Button1) == DialogResult.OK)
                System.Diagnostics.Process.Start("https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=J3JHSCBJPR872&lc=US&item_name=XDA%20Facebook%20Donation&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted", null);
            else
            {
                Clipboard.SetDataObject(
                    "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=J3JHSCBJPR872&lc=US&item_name=XDA%20Facebook%20Donation&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted");

                MessageBox.Show("PayPal URL is in your clipbard and ready to paste!");
            }
        }
    }
}